Miles Sound System SDK 7.2a

Extended MIDI IFF (.XMI) Structure

Discussion

XMIDI sequence files are "preprocessed" MIDI sequence files. Created by the Miles Sound Studio utility described in the Tools Reference Section (or the AIL_MIDI_to_XMI function), XMIDI files are stored in accordance with Electronic Arts' Interchange File Format (EA IFF 85) standard. Below is a summary of the XMIDI format's technical details, which is presented as an aid to application developers with specialized needs not supported directly by the Miles Sound System.

The XMIDI file format preserves all of the information needed to faithfully reproduce the MIDI sequence's original sound, while discarding elements of the MIDI storage format that are redundant, inefficient, or otherwise unnecessary for real-time playback. An XMIDI file containing a single translated MIDI sequence often requires from 10% to 30% less storage space, and can be performed with substantially less background processing time.

Each XMIDI file contains a single IFF "CAT" chunk of type XMID. The CAT chunk contains at least one XMIDI sequence, whose local chunks are stored within a "FORM" chunk of type XMID. The XMIDI file may contain a chunk of type FORM XDIR which contains information about the file's collection of XMIDI sequences. The XDIR chunk is for the application's benefit, and is not currently required by the XMIDI drivers.

In the expression below, signifies a 32-bit "big endian" (or Motorola 680XX-style, MSB first) chunk length, which includes neither itself nor its preceding 4-character CAT, FORM, or local chunk name. Square brackets enclose optional chunks; ellipses are placed after the closing braces of chunks or data items which may be repeated.


[
FORM < len > XDIR
{
INFO < len >
U16 # of FORMs XMID in file, 1-65535
}
]
CAT < len > XMID
{
FORM < len > XMID
{
[
TIMB < len >
U16 # of timbre list entries, 0-16384
{
U8 patch number 0-127
U8 timbre bank 0-127
}
...
]
[
RBRN < len >
U16 # of branch point offsets, 0-127
{
U16 Sequence Branch Index controller value 0-127
U32 controller offset from start of EVNT chunk
}
...
]
EVNT < len >
{
U8 interval count (if < 128)
U8 (if > 127)
}
...
}
...
}

TIMB and RBRN are optional chunks. RBRN is included only if XMIDI Sequence Branch Index (120) controllers appear in the original MIDI sequence. The mandatory EVNT chunk contains the quantized sequence events. EVNT must appear as the last local chunk in FORM XMID, while the other local chunks may appear in any order. consists of any MIDI Channel Voice, System Exclusive, or Meta-event except Note Off. The MIDI 'running status' convention is not used. Note On events are followed by their duration in intervals, expressed as a MIDI variable-length quantity (i.e., a string of 7-bit bytes stored most significant byte first, with the high bit set in all bytes except the last).

Next Topic (Extended MIDI Global Timbre Library File Format)

Previous Topic (XMIDI Sequence Branch Index (120))


Group: Extended MIDI Technical Reference
Related Sections: Miles Sound Studio
Related Functions: AIL_MIDI_to_XMI, AIL_init_sequence

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.